package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the HOLIDAY database table.
 * 
 */
@Entity
@NamedQuery(name="Holiday.findAll", query="SELECT h FROM Holiday h")
public class Holiday implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="HOLIDAY_HOLIDAYID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="HOLIDAY_HOLIDAYID_GENERATOR")
	@Column(name="HOLIDAY_ID")
	private long holidayId;

	@Column(name="HOLIDAY_FOUNDDATE")
	private Timestamp holidayFounddate;

	@Column(name="HOLIDAY_LEGAL")
	private BigDecimal holidayLegal;

	@Column(name="HOLIDAY_NAME")
	private String holidayName;

	@Column(name="HOLIDAY_PERSON")
	private String holidayPerson;

	@Column(name="HOLIDAY_PERSONAL")
	private String holidayPersonal;

	@Column(name="HOLIDAY_REMARKS")
	private String holidayRemarks;

	@Column(name="HOLIDAY_SALARY")
	private String holidaySalary;

	@Column(name="HOLIDAY_TYPE")
	private BigDecimal holidayType;

	@Column(name="HOLIDAY_UPDATE")
	private Timestamp holidayUpdate;

	//bi-directional many-to-one association to Confirmaffair
	@OneToMany(mappedBy="holiday")
	@JSONField(serialize=false)
	private List<Confirmaffair> confirmaffairs;

	//bi-directional many-to-one association to Leaveconfirm
	@OneToMany(mappedBy="holiday")
	@JSONField(serialize=false)
	private List<Leaveconfirm> leaveconfirms;

	public Holiday() {
	}

	public long getHolidayId() {
		return this.holidayId;
	}

	public void setHolidayId(long holidayId) {
		this.holidayId = holidayId;
	}

	public Timestamp getHolidayFounddate() {
		return this.holidayFounddate;
	}

	public void setHolidayFounddate(Timestamp holidayFounddate) {
		this.holidayFounddate = holidayFounddate;
	}

	public BigDecimal getHolidayLegal() {
		return this.holidayLegal;
	}

	public void setHolidayLegal(BigDecimal holidayLegal) {
		this.holidayLegal = holidayLegal;
	}

	public String getHolidayName() {
		return this.holidayName;
	}

	public void setHolidayName(String holidayName) {
		this.holidayName = holidayName;
	}

	public String getHolidayPerson() {
		return this.holidayPerson;
	}

	public void setHolidayPerson(String holidayPerson) {
		this.holidayPerson = holidayPerson;
	}

	public String getHolidayPersonal() {
		return this.holidayPersonal;
	}

	public void setHolidayPersonal(String holidayPersonal) {
		this.holidayPersonal = holidayPersonal;
	}

	public String getHolidayRemarks() {
		return this.holidayRemarks;
	}

	public void setHolidayRemarks(String holidayRemarks) {
		this.holidayRemarks = holidayRemarks;
	}

	public String getHolidaySalary() {
		return this.holidaySalary;
	}

	public void setHolidaySalary(String holidaySalary) {
		this.holidaySalary = holidaySalary;
	}

	public BigDecimal getHolidayType() {
		return this.holidayType;
	}

	public void setHolidayType(BigDecimal holidayType) {
		this.holidayType = holidayType;
	}

	public Timestamp getHolidayUpdate() {
		return this.holidayUpdate;
	}

	public void setHolidayUpdate(Timestamp holidayUpdate) {
		this.holidayUpdate = holidayUpdate;
	}

	public List<Confirmaffair> getConfirmaffairs() {
		return this.confirmaffairs;
	}

	public void setConfirmaffairs(List<Confirmaffair> confirmaffairs) {
		this.confirmaffairs = confirmaffairs;
	}

	public Confirmaffair addConfirmaffair(Confirmaffair confirmaffair) {
		getConfirmaffairs().add(confirmaffair);
		confirmaffair.setHoliday(this);

		return confirmaffair;
	}

	public Confirmaffair removeConfirmaffair(Confirmaffair confirmaffair) {
		getConfirmaffairs().remove(confirmaffair);
		confirmaffair.setHoliday(null);

		return confirmaffair;
	}

	public List<Leaveconfirm> getLeaveconfirms() {
		return this.leaveconfirms;
	}

	public void setLeaveconfirms(List<Leaveconfirm> leaveconfirms) {
		this.leaveconfirms = leaveconfirms;
	}

	public Leaveconfirm addLeaveconfirm(Leaveconfirm leaveconfirm) {
		getLeaveconfirms().add(leaveconfirm);
		leaveconfirm.setHoliday(this);

		return leaveconfirm;
	}

	public Leaveconfirm removeLeaveconfirm(Leaveconfirm leaveconfirm) {
		getLeaveconfirms().remove(leaveconfirm);
		leaveconfirm.setHoliday(null);

		return leaveconfirm;
	}

}